home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __IAPPLICATIONSTATE_H_
- #define __IAPPLICATIONSTATE_H_
- /*
- Peon - Win32 Games Programming Library
- Copyright (C) 2002-2005 Erik Yuzwa
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- Erik Yuzwa
- peon AT wazooinc DOT com
- */
-
- #include "IUnknown.h"
-
- namespace peon
- {
- /**
- * This base object is responsible for containing everything and anything
- * that belongs in its own state during the lifetime of the game.
- */
- class PEONMAIN_API IApplicationState : public IUnknown
- {
- public:
- /**
- * Constructor
- */
- IApplicationState(){}
-
- /**
- * Destructor
- */
- virtual ~IApplicationState(){}
-
- /**
- * This method is launched when we want to load up and create everything
- * within this state.
- * @return bool - true if ok
- */
- virtual bool onLoad() = 0;
-
- /**
- * This method is launched when its time to cleanup and free any
- * allocated memory for this state
- */
- virtual void onUnload() = 0;
-
- /**
- * This method is launched when the engine signals the chance to
- * update this state
- * @param fElapsedTime - the delta used for calculating object movement
- */
- virtual void onUpdate( float fElapsedTime ) = 0;
-
- /**
- * This method is responsible for processing any rendering commands
- * for this state
- */
- virtual void onRender(){}
- };
- }
-
- #endif
-